package com.xhorse.lockplatform.comm.model;

/**
* @Author: Tom
* @Date: 11:41 2018/3/27
* @Description:  api返回信息
*/
public class Result<T> {

    /**
     * 错误码
     */
    private String status;
    /**
     * 提示信息
     */
    private String errorMsg;
    /**
     * 内容
     */
    private T data;

    public Result(String status, String errorMsg) {
        this.status = status;
        this.errorMsg = errorMsg;
    }

    public Result(String status, String errorMsg, T data) {
        this.status = status;
        this.errorMsg = errorMsg;
        this.data = data;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "status=" + status +
                ", errorMsg='" + errorMsg + '\'' +
                ", data=" + data +
                '}';
    }
}
